package com.example.yadmin.sys.controller;

import com.example.yadmin.common.vo.Result;
import com.example.yadmin.sys.entity.Chat;
import com.example.yadmin.sys.entity.Talk;
import com.example.yadmin.sys.mapper.TalkMapper;
import com.example.yadmin.sys.service.ITalkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ag
 * @since 2023-11-04
 */
@RestController
@RequestMapping("/talk")
public class TalkController {
    @Autowired
    private ITalkService talkService;
    @Autowired
    private TalkMapper talkMapper;
    @GetMapping("/all")
    public Result<List<Talk>> getAllTalk(){
        List<Talk> list = talkService.list();
        return Result.success(list,"查询成功");
    }

}
